package com.jx.driving.util;

import com.jx.driving.protocol.terminal.channel.Channel;

/**
 * 通道辅助类
 * 
 * @author shenliuyang
 *
 *         2016年8月18日下午3:29:48
 */
public class ChannelUtils {
    /**
     * 获取手机号
     */
    public static String getPhone(Channel channel) {
	if (channel == null) {
	    return "0000000000000000";
	}
	return channel.attr("TERMINAL_PHONE");
    }

    /**
     * 设置
     */
    public static void setPhone(Channel channel, String phone) {
	if (channel == null) {
	    return;
	}
	channel.attr("TERMINAL_PHONE", phone);
    }
}
